home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-MIPS / ELF.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  74 lines

  1. /*
  2.  * $Id: elf.h,v 1.10 1998/05/01 01:35:51 ralf Exp $
  3.  */
  4. #ifndef __ASM_MIPS_ELF_H
  5. #define __ASM_MIPS_ELF_H
  6.  
  7. /* ELF register definitions */
  8. #define ELF_NGREG    45
  9. #define ELF_NFPREG    33
  10.  
  11. typedef unsigned long elf_greg_t;
  12. typedef elf_greg_t elf_gregset_t[ELF_NGREG];
  13.  
  14. typedef double elf_fpreg_t;
  15. typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  16.  
  17. /*
  18.  * This is used to ensure we don't load something for the wrong architecture.
  19.  */
  20. #define elf_check_arch(x) ((x) == EM_MIPS || (x) == EM_MIPS_RS4_BE)
  21.  
  22. /*
  23.  * These are used to set parameters in the core dumps.
  24.  * FIXME(eric) I don't know what the correct endianness to use is.
  25.  */
  26. #define ELF_CLASS    ELFCLASS32
  27. #ifdef __MIPSEB__
  28. #define ELF_DATA    ELFDATA2MSB
  29. #elif __MIPSEL__
  30. #define ELF_DATA    ELFDATA2LSB
  31. #endif
  32. #define ELF_ARCH    EM_MIPS
  33.  
  34. #define USE_ELF_CORE_DUMP
  35. #define ELF_EXEC_PAGESIZE    4096
  36.  
  37. #define ELF_CORE_COPY_REGS(_dest,_regs)                \
  38.     memcpy((char *) &_dest, (char *) _regs,            \
  39.            sizeof(struct pt_regs));
  40.  
  41. /* This yields a mask that user programs can use to figure out what
  42.    instruction set this cpu supports.  This could be done in userspace,
  43.    but it's not easy, and we've already done it here.  */
  44.  
  45. #define ELF_HWCAP       (0)
  46.  
  47. /* This yields a string that ld.so will use to load implementation
  48.    specific libraries for optimization.  This is more specific in
  49.    intent than poking at uname or /proc/cpuinfo.
  50.  
  51.    For the moment, we have only optimizations for the Intel generations,
  52.    but that could change... */
  53.  
  54. #define ELF_PLATFORM  (NULL)
  55.  
  56. /* See comments in asm-alpha/elf.h, this is the same thing
  57.  * on the MIPS.
  58.  */
  59. #define ELF_PLAT_INIT(_r)    _r->regs[2] = 0;
  60.  
  61. /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
  62.    use of this is to invoke "./ld.so someprog" to test out a new version of
  63.    the loader.  We need to make sure that it is out of the way of the program
  64.    that it will "exec", and that there is sufficient room for the brk.  */
  65.  
  66. #define ELF_ET_DYN_BASE         (2 * TASK_SIZE / 3)
  67.  
  68. #ifdef __KERNEL__
  69. #define SET_PERSONALITY(ex,ibcs2) \
  70.     current->personality = (ibcs2 ? PER_SVR4 : PER_LINUX)
  71. #endif
  72.  
  73. #endif /* __ASM_MIPS_ELF_H */
  74.